# Contributor: Jeff Bilyk<jbilyk at gmail>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mrtg
pkgver=2.17.10
pkgrel=1
pkgdesc="MRTG Network Latency Monitoring"
url="https://oss.oetiker.ch/mrtg/"
arch="all"
license="GPL-2.0-or-later"
options="!check" # no testsuite
depends="perl"
makedepends="gd-dev libpng-dev zlib-dev"
subpackages="$pkgname-doc"
source="https://oss.oetiker.ch/mrtg/pub/mrtg-$pkgver.tar.gz
	mrtg.initd mrtg.confd"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--bindir=/usr/bin \
		--libdir=/usr/lib \
		--datadir=/usr/share/doc \
		--mandir=/usr/share/doc/man
	make
}

package() {
	make install DESTDIR="$pkgdir"
}

sha512sums="
b1c5232f1b3dcec39adc4fb5a423738f9470ad470e91c6a918cf3f875e71af263d8e03694c3d66129b2653fa498d8d9d9b95349fe90e9d2e0b3ed6c09d06e080  mrtg-2.17.10.tar.gz
bafdee6845f9f38ca4e3a547ac74e4fdbe444f351f7548b894f2cd3ff39a8eb7d19558459d1c54f5d547e730b8d011e128331c4ec84a192f8ec1c7faa0b577a2  mrtg.initd
ee42805b0d3abb802e7e69d1544f2821223183aadf3a6009c9434e56054d9b0df579e83a9f6ab22afa65590f6d331daf49fb512ac2578e9f473b6d40382dd2b5  mrtg.confd
"
